/************************************************************************************************/
/*Lab 3: AC_Test.cc										*/
/*												*/
/*Description: This is a test program, created to test "AssemblerClasses" commands.		*/ 
/************************************************************************************************/

#include <iostream>
#include <vector>
#include <string>
#include "AssemblerClasses.hh"

using namespace std;

int main()
	{
	AssemblerData a;
	string fname("F_0");
	unsigned int i,j;
	vector<string> vec1, vec2, vec3, vec4;
	

	for(i = 0;i < 10;i++)
		{
		vec1.push_back("a");
		a.text_append(vec1,i+1,fname);
		vec2.push_back("b");
		a.ktext_append(vec2,i+2,fname);
		vec3.push_back("c");
		a.data_append(vec3,i+3,fname);
		vec4.push_back("d");
		a.kdata_append(vec4,i+4,fname);

		fname[2] = fname[2]+1;
		}

	/* Print Test Message */

	/*text*/
	for(i = 0;i < 10;i++)
		{
		fname.clear();
		for(j = 0;j < a.ret_text(i).size();j++)
			{
			fname += a.ret_text(i)[j];
			}
		cout << "\".text\" " << i << ":\t" << fname << endl;
		cout << "LineNumber:\t" << a.ret_textLN(i) << endl;
		cout << "FileName:\t" << a.ret_textFN(i) << endl;
		}
	cout << endl;

	/*ktext*/
	for(i = 0;i < 10;i++)
		{
		fname.clear();
		for(j = 0;j < a.ret_ktext(i).size();j++)
			{
			fname += a.ret_ktext(i)[j];
			}
		cout << "\".ktext\" " << i << ":\t" << fname << endl;
		cout << "LineNumber:\t" << a.ret_ktextLN(i) << endl;
		cout << "FileName:\t" << a.ret_ktextFN(i) << endl;
		}
	cout << endl;

	/*data*/
	for(i = 0;i < 10;i++)
		{
		fname.clear();
		for(j = 0;j < a.ret_data(i).size();j++)
			{
			fname += a.ret_data(i)[j];
			}
		cout << "\".data\" " << i << ":\t" << fname << endl;
		cout << "LineNumber:\t" << a.ret_dataLN(i) << endl;
		cout << "FileName:\t" << a.ret_dataFN(i) << endl;
		}
	cout << endl;

	/*kdata*/
	for(i = 0;i < 10;i++)
		{
		fname.clear();
		for(j = 0;j < a.ret_kdata(i).size();j++)
			{
			fname += a.ret_kdata(i)[j];
			}
		cout << "\".kdata\" " << i << ":\t" << fname << endl;
		cout << "LineNumber:\t" << a.ret_kdataLN(i) << endl;
		cout << "FileName:\t" << a.ret_kdataFN(i) << endl;
		}
	cout << endl;

	return 0;
	}


